﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Name="window" x:Class="Pages.MainWindow"
    Title="Tweety" 
    Height="438" 
    Width="392" 
    StateChanged="window_StateChanged" 
    Closing="window_Closing" 
    Loaded="Window_Loaded" 
    Background="White" Icon="/Tweety;component/Resources/Peace Dove.ico" mc:Ignorable="d" ResizeMode="CanResize">
    
    <Grid x:Name="grdMain" HorizontalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="70"/>
            <RowDefinition  Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <ScrollViewer Margin="50,6,63,0" VerticalScrollBarVisibility="Auto" Height="58">
            <TextBox x:Name="txtStatus" TextWrapping="WrapWithOverflow" TextChanged="txtStatus_TextChanged" Padding="0" BorderThickness="0" KeyDown="txtStatus_KeyDown" />
        </ScrollViewer>
        
        <Button Margin="5,5,0,0" x:Name="btnRefresh" HorizontalAlignment="Left" Click="btnRefresh_Click" FontSize="10.667" Width="40" Height="40" VerticalAlignment="Top">
            <Image Stretch="Fill" Source="/Tweety;component/Resources/Peace Dove.ico" ToolTip="Refresh Tweets" />
        </Button>
        <Button x:Name="btnSettings" Click="btnSettings_Click" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,5,5,0" Height="54" Width="54" Background="{x:Null}">
            <Image Margin="1" x:Name="imgProfile" Stretch="Fill" ToolTip="Settings" />
        </Button>
        <Button x:Name="btnError" Grid.Row="1" Height="0" HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" Width="288" Click="btnError_Click" />
        
        <ScrollViewer Grid.Row="2">
            <Grid Grid.Row="2" Height="auto" Margin="0" x:Name="grdTweets" ShowGridLines="False">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="48" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
            </Grid>
        </ScrollViewer>
        <StackPanel Grid.RowSpan="3" Height="71" HorizontalAlignment="Right" Margin="279,9,0,0" Visibility="Hidden" Name="panelUpdateStatus" VerticalAlignment="Top" Width="58">
            <Button x:Name="btnUpdateStatus" Background="OrangeRed" Height="22" Width="50" Content="Save" Click="btnUpdateStatus_Click" IsDefault="True" />
            <Button x:Name="btnCancelUpdate" Background="LightSkyBlue" Height="22" Width="50" Content="Cancel" Click="btnCancelUpdate_Click" IsCancel="True" />
            <Label Content="100" Height="28" Name="lblLetterCount" HorizontalContentAlignment="Center" FontWeight="Bold" FontStretch="Normal" FontSize="14" Padding="1" />
        </StackPanel>
    </Grid>
    
    <Window.Resources>
    <Storyboard x:Key="DisplayError">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btnError" Storyboard.TargetProperty="(FrameworkElement.Height)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            <SplineDoubleKeyFrame KeyTime="00:00:00.50" Value="24"/>
        </DoubleAnimationUsingKeyFrames>
        <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btnError" Storyboard.TargetProperty="(FrameworkElement.Margin)">
            <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
            <SplineThicknessKeyFrame KeyTime="00:00:00.50" Value="0,0,0,5"/>
        </ThicknessAnimationUsingKeyFrames>
    </Storyboard>
        <Storyboard x:Key="HideError">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btnError" Storyboard.TargetProperty="(FrameworkElement.Height)">
            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="24"/>
            <SplineDoubleKeyFrame KeyTime="00:00:00.50" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
        <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btnError" Storyboard.TargetProperty="(FrameworkElement.Margin)">
            <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0,0,0,5"/>
            <SplineThicknessKeyFrame KeyTime="00:00:00.50" Value="0"/>
        </ThicknessAnimationUsingKeyFrames>		
    </Storyboard>

</Window.Resources>
</Window>
